package com.xiguanlezz.cn;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * <pre>
 * 首字母最好大写
 * </pre>
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.68.0)",
    comments = "Source: userService.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class UserServiceGrpc {

  private UserServiceGrpc() {}

  public static final java.lang.String SERVICE_NAME = "UserService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest,
      com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLoginMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "login",
      requestType = com.xiguanlezz.cn.UserServiceProto.LoginRequest.class,
      responseType = com.xiguanlezz.cn.UserServiceProto.LoginResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest,
      com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLoginMethod() {
    io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest, com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLoginMethod;
    if ((getLoginMethod = UserServiceGrpc.getLoginMethod) == null) {
      synchronized (UserServiceGrpc.class) {
        if ((getLoginMethod = UserServiceGrpc.getLoginMethod) == null) {
          UserServiceGrpc.getLoginMethod = getLoginMethod =
              io.grpc.MethodDescriptor.<com.xiguanlezz.cn.UserServiceProto.LoginRequest, com.xiguanlezz.cn.UserServiceProto.LoginResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "login"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.xiguanlezz.cn.UserServiceProto.LoginRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.xiguanlezz.cn.UserServiceProto.LoginResponse.getDefaultInstance()))
              .setSchemaDescriptor(new UserServiceMethodDescriptorSupplier("login"))
              .build();
        }
      }
    }
    return getLoginMethod;
  }

  private static volatile io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest,
      com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin2Method;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "login2",
      requestType = com.xiguanlezz.cn.UserServiceProto.LoginRequest.class,
      responseType = com.xiguanlezz.cn.UserServiceProto.LoginResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest,
      com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin2Method() {
    io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest, com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin2Method;
    if ((getLogin2Method = UserServiceGrpc.getLogin2Method) == null) {
      synchronized (UserServiceGrpc.class) {
        if ((getLogin2Method = UserServiceGrpc.getLogin2Method) == null) {
          UserServiceGrpc.getLogin2Method = getLogin2Method =
              io.grpc.MethodDescriptor.<com.xiguanlezz.cn.UserServiceProto.LoginRequest, com.xiguanlezz.cn.UserServiceProto.LoginResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "login2"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.xiguanlezz.cn.UserServiceProto.LoginRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.xiguanlezz.cn.UserServiceProto.LoginResponse.getDefaultInstance()))
              .setSchemaDescriptor(new UserServiceMethodDescriptorSupplier("login2"))
              .build();
        }
      }
    }
    return getLogin2Method;
  }

  private static volatile io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest,
      com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin3Method;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "login3",
      requestType = com.xiguanlezz.cn.UserServiceProto.LoginRequest.class,
      responseType = com.xiguanlezz.cn.UserServiceProto.LoginResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
  public static io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest,
      com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin3Method() {
    io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest, com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin3Method;
    if ((getLogin3Method = UserServiceGrpc.getLogin3Method) == null) {
      synchronized (UserServiceGrpc.class) {
        if ((getLogin3Method = UserServiceGrpc.getLogin3Method) == null) {
          UserServiceGrpc.getLogin3Method = getLogin3Method =
              io.grpc.MethodDescriptor.<com.xiguanlezz.cn.UserServiceProto.LoginRequest, com.xiguanlezz.cn.UserServiceProto.LoginResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "login3"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.xiguanlezz.cn.UserServiceProto.LoginRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.xiguanlezz.cn.UserServiceProto.LoginResponse.getDefaultInstance()))
              .setSchemaDescriptor(new UserServiceMethodDescriptorSupplier("login3"))
              .build();
        }
      }
    }
    return getLogin3Method;
  }

  private static volatile io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest,
      com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin4Method;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "login4",
      requestType = com.xiguanlezz.cn.UserServiceProto.LoginRequest.class,
      responseType = com.xiguanlezz.cn.UserServiceProto.LoginResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest,
      com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin4Method() {
    io.grpc.MethodDescriptor<com.xiguanlezz.cn.UserServiceProto.LoginRequest, com.xiguanlezz.cn.UserServiceProto.LoginResponse> getLogin4Method;
    if ((getLogin4Method = UserServiceGrpc.getLogin4Method) == null) {
      synchronized (UserServiceGrpc.class) {
        if ((getLogin4Method = UserServiceGrpc.getLogin4Method) == null) {
          UserServiceGrpc.getLogin4Method = getLogin4Method =
              io.grpc.MethodDescriptor.<com.xiguanlezz.cn.UserServiceProto.LoginRequest, com.xiguanlezz.cn.UserServiceProto.LoginResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "login4"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.xiguanlezz.cn.UserServiceProto.LoginRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.xiguanlezz.cn.UserServiceProto.LoginResponse.getDefaultInstance()))
              .setSchemaDescriptor(new UserServiceMethodDescriptorSupplier("login4"))
              .build();
        }
      }
    }
    return getLogin4Method;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static UserServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<UserServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<UserServiceStub>() {
        @java.lang.Override
        public UserServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new UserServiceStub(channel, callOptions);
        }
      };
    return UserServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static UserServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<UserServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<UserServiceBlockingStub>() {
        @java.lang.Override
        public UserServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new UserServiceBlockingStub(channel, callOptions);
        }
      };
    return UserServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static UserServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<UserServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<UserServiceFutureStub>() {
        @java.lang.Override
        public UserServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new UserServiceFutureStub(channel, callOptions);
        }
      };
    return UserServiceFutureStub.newStub(factory, channel);
  }

  /**
   * <pre>
   * 首字母最好大写
   * </pre>
   */
  public interface AsyncService {

    /**
     * <pre>
     * 普通rpc，客户端一次阻塞调用，服务端返回结果
     * </pre>
     */
    default void login(com.xiguanlezz.cn.UserServiceProto.LoginRequest request,
        io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLoginMethod(), responseObserver);
    }

    /**
     * <pre>
     * 服务端流式rpc
     * </pre>
     */
    default void login2(com.xiguanlezz.cn.UserServiceProto.LoginRequest request,
        io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLogin2Method(), responseObserver);
    }

    /**
     * <pre>
     * 客户端流式rpc
     * </pre>
     */
    default io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginRequest> login3(
        io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse> responseObserver) {
      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getLogin3Method(), responseObserver);
    }

    /**
     * <pre>
     * 双向流式rpc
     * </pre>
     */
    default io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginRequest> login4(
        io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse> responseObserver) {
      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getLogin4Method(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service UserService.
   * <pre>
   * 首字母最好大写
   * </pre>
   */
  public static abstract class UserServiceImplBase
      implements io.grpc.BindableService, AsyncService {

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return UserServiceGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service UserService.
   * <pre>
   * 首字母最好大写
   * </pre>
   */
  public static final class UserServiceStub
      extends io.grpc.stub.AbstractAsyncStub<UserServiceStub> {
    private UserServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected UserServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new UserServiceStub(channel, callOptions);
    }

    /**
     * <pre>
     * 普通rpc，客户端一次阻塞调用，服务端返回结果
     * </pre>
     */
    public void login(com.xiguanlezz.cn.UserServiceProto.LoginRequest request,
        io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getLoginMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 服务端流式rpc
     * </pre>
     */
    public void login2(com.xiguanlezz.cn.UserServiceProto.LoginRequest request,
        io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getLogin2Method(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 客户端流式rpc
     * </pre>
     */
    public io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginRequest> login3(
        io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse> responseObserver) {
      return io.grpc.stub.ClientCalls.asyncClientStreamingCall(
          getChannel().newCall(getLogin3Method(), getCallOptions()), responseObserver);
    }

    /**
     * <pre>
     * 双向流式rpc
     * </pre>
     */
    public io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginRequest> login4(
        io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse> responseObserver) {
      return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
          getChannel().newCall(getLogin4Method(), getCallOptions()), responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service UserService.
   * <pre>
   * 首字母最好大写
   * </pre>
   */
  public static final class UserServiceBlockingStub
      extends io.grpc.stub.AbstractBlockingStub<UserServiceBlockingStub> {
    private UserServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected UserServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new UserServiceBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     * 普通rpc，客户端一次阻塞调用，服务端返回结果
     * </pre>
     */
    public com.xiguanlezz.cn.UserServiceProto.LoginResponse login(com.xiguanlezz.cn.UserServiceProto.LoginRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getLoginMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 服务端流式rpc
     * </pre>
     */
    public java.util.Iterator<com.xiguanlezz.cn.UserServiceProto.LoginResponse> login2(
        com.xiguanlezz.cn.UserServiceProto.LoginRequest request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getLogin2Method(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service UserService.
   * <pre>
   * 首字母最好大写
   * </pre>
   */
  public static final class UserServiceFutureStub
      extends io.grpc.stub.AbstractFutureStub<UserServiceFutureStub> {
    private UserServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected UserServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new UserServiceFutureStub(channel, callOptions);
    }

    /**
     * <pre>
     * 普通rpc，客户端一次阻塞调用，服务端返回结果
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.xiguanlezz.cn.UserServiceProto.LoginResponse> login(
        com.xiguanlezz.cn.UserServiceProto.LoginRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getLoginMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_LOGIN = 0;
  private static final int METHODID_LOGIN2 = 1;
  private static final int METHODID_LOGIN3 = 2;
  private static final int METHODID_LOGIN4 = 3;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final AsyncService serviceImpl;
    private final int methodId;

    MethodHandlers(AsyncService serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_LOGIN:
          serviceImpl.login((com.xiguanlezz.cn.UserServiceProto.LoginRequest) request,
              (io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse>) responseObserver);
          break;
        case METHODID_LOGIN2:
          serviceImpl.login2((com.xiguanlezz.cn.UserServiceProto.LoginRequest) request,
              (io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_LOGIN3:
          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.login3(
              (io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse>) responseObserver);
        case METHODID_LOGIN4:
          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.login4(
              (io.grpc.stub.StreamObserver<com.xiguanlezz.cn.UserServiceProto.LoginResponse>) responseObserver);
        default:
          throw new AssertionError();
      }
    }
  }

  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
        .addMethod(
          getLoginMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.xiguanlezz.cn.UserServiceProto.LoginRequest,
              com.xiguanlezz.cn.UserServiceProto.LoginResponse>(
                service, METHODID_LOGIN)))
        .addMethod(
          getLogin2Method(),
          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
            new MethodHandlers<
              com.xiguanlezz.cn.UserServiceProto.LoginRequest,
              com.xiguanlezz.cn.UserServiceProto.LoginResponse>(
                service, METHODID_LOGIN2)))
        .addMethod(
          getLogin3Method(),
          io.grpc.stub.ServerCalls.asyncClientStreamingCall(
            new MethodHandlers<
              com.xiguanlezz.cn.UserServiceProto.LoginRequest,
              com.xiguanlezz.cn.UserServiceProto.LoginResponse>(
                service, METHODID_LOGIN3)))
        .addMethod(
          getLogin4Method(),
          io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
            new MethodHandlers<
              com.xiguanlezz.cn.UserServiceProto.LoginRequest,
              com.xiguanlezz.cn.UserServiceProto.LoginResponse>(
                service, METHODID_LOGIN4)))
        .build();
  }

  private static abstract class UserServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    UserServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.xiguanlezz.cn.UserServiceProto.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("UserService");
    }
  }

  private static final class UserServiceFileDescriptorSupplier
      extends UserServiceBaseDescriptorSupplier {
    UserServiceFileDescriptorSupplier() {}
  }

  private static final class UserServiceMethodDescriptorSupplier
      extends UserServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final java.lang.String methodName;

    UserServiceMethodDescriptorSupplier(java.lang.String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (UserServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new UserServiceFileDescriptorSupplier())
              .addMethod(getLoginMethod())
              .addMethod(getLogin2Method())
              .addMethod(getLogin3Method())
              .addMethod(getLogin4Method())
              .build();
        }
      }
    }
    return result;
  }
}
